package com.zeus.springhibernate;

import org.activiti.engine.repository.ProcessDefinition;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.List;

/**
 * Created by Administrator on 2015/9/4.
 */
public class Main {
    public static void main(String[] args) {
        ApplicationContext apx = new ClassPathXmlApplicationContext("applicationContext.xml");

        ActivitiService activitiService = apx.getBean(ActivitiService.class);
        List<ProcessDefinition> list = activitiService.getAllProcessDefinition();
        for(ProcessDefinition processDefinition:list){
            p("Key:"+processDefinition.getKey());
        }
    }
    public static void p(Object o){
        System.out.println(o.toString());
    }
}
